package com.example.boaviagemluiza;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View.OnCreateContextMenuListener;

public class ViagemActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.nova_viagem);
		
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
	MenuInflater inflater = getMenuInflater();
	inflater.inflate(R.menu.viagem_menu, menu);
	return true;
	}
	
	@Override
	public boolean onMenuItemSelected(int featureId, MenuItem item) {
		switch (item.getItemId()) {
			case R.id.novo_gasto:
				startActivity(new Intent(this, GastoActivity.class));
				return true;
			case R.id.remover:
				//remover viagem do banco de dados
				return true;
			default:
				return super.onMenuItemSelected(featureId, item);
		}
		
	}

}
